﻿@{
    ViewBag.Title = "相似文章";
}
@model IEnumerable<SimilarityResult>
<div class="level">
    <a href="/articles/similarity?s=70" class="layui-btn @(Request["s"]=="70"?"layui-btn-primary":"")">>70</a>
    <a href="/articles/similarity?s=75" class="layui-btn @(Request["s"]=="75"?"layui-btn-primary":"")">>75</a>
    <a href="/articles/similarity?s=80" class="layui-btn @(Request["s"]=="80"?"layui-btn-primary":"")">>80</a>
    <a href="/articles/similarity?s=85" class="layui-btn @(Request["s"]=="85"?"layui-btn-primary":"")">>85</a>
    <a href="/articles/similarity?s=90" class="layui-btn @(Request["s"]=="90"?"layui-btn-primary":"")">>90</a>
    <a href="/articles/similarity?s=95" class="layui-btn @(Request["s"]=="95"?"layui-btn-primary":"")">>95</a>
</div>
<table class="layui-table">
    <thead>
        <tr>
            <th>标题</th>
            <th>相似文章</th>
            <th>片段数量</th>
            <th>创建时间</th>
            <th>操作</th>
        </tr>
    </thead>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @item.Title
            </td>
            <td>
                @item.Count
            </td>
            <td>
                @item.Fragments
            </td>
            <td>
                @item.CreateTime
            </td>
            <td>
                <a href="/articles/similarlist/@item.ID?s=@Request["s"]&returnUrl=@Request.Url.PathAndQuery">辩选</a>
            </td>
        </tr>
    }
</table>
@using Webdiyer.WebControls.Mvc;
@Html.Pager(new PagedList<ArticleWeb.Models.SimilarityResult>(Model, Request.GetPageIndex(), Request.GetPageSize(), ViewBag.Total), new PagerOptions
{
    PageIndexParameterName = "page",
    CurrentPagerItemWrapperFormatString = "<span class=\"layui-laypage-curr\"><em class=\"layui-laypage-em\"></em><em>{0}</em></span>",
}, new { @class = "layui-box layui-laypage layui-laypage-default" })
<p>待处理（@ViewBag.pending）</p>
@section scripts{
<script>
    $(".level .layui-btn-primary").attr('href', "javascript:;").css('cursor', 'default');
    </script>
}
